package com.qf.service.impl;

import com.qf.dao.GoodsDetailDao;
import com.qf.pojo.GoodsDetail;
import com.qf.pojo.resp.BaseResult;
import com.qf.service.GoodsDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GoodsDetailServiceImpl implements GoodsDetailService {

    @Resource
    GoodsDetailDao goodsDetailDao;

    @Override
    public BaseResult showGood(Integer gid) {
        BaseResult baseResult = new BaseResult();
        List<GoodsDetail> goodsDetails = goodsDetailDao.showGoodById(gid);
        System.out.println(goodsDetails);
        baseResult.setCode(1);
        baseResult.setData(goodsDetails);
        return baseResult;
    }
}
